package com.example.config;

import com.power.common.interfaces.IMessage;

public  enum  ErrorCodeEnum implements IMessage {
    SUCCESS("0000", "succeed"),
    Add_SUCCESS("0000","添加成功"),
    Add_FAil("0001","添加失败"),
    Delete_SUCCESS("0000","删除成功"),
    Delete_FAIL("0001","删除失败"),
    Change_SUCCESS("0000","修改成功"),
    Change_Fail("0001","修改失败"),
    Select_SUCCESS("0000","查询成功"),
    Select_Fail("0001","查询失败"),

    PARAM_EMPTY("1001", "必选参数为空"),
    PARAM_ERROR("1002", "参数格式错误"),
    UNKNOWN_ERROR("9999", "系统繁忙，请稍后再试....");

    private String code;
    private String message;

    ErrorCodeEnum(String errCode, String errMsg) {
        this.code = errCode;
        this.message = errMsg;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}